local app = require 'app'
local game = app.game.running

return
{
    on_befor_enter = function()
        if not app.game.running.game_scene.loaded then
            app.game.running.store.ingame.throttle(true)
        end
    end,

    on_enter = function()
        local finished = false
        app.game.running.router.go('/club.threecard.doudizhu/ingame', function()
            finished = true
        end)
        while not finished do
            app.game.running.coroutine.step()
        end
    end,

    on_exit = function()
        app.game.running.router.go('/club.threecard.doudizhu/entrance')
    end
}